Package com.stytch.sdk.common.errors

Types

Link copied to clipboard
data class StytchAPIError(    val requestId: String? = null,     val errorType: String,     val message: String,     val url: String? = null) : StytchError

An error class representing non-schema error that occurs in Stytch API

Link copied to clipboard
data class StytchAPISchemaError(val message: String) : StytchError

An error class representing a schema error that occurs in Stytch API

Link copied to clipboard
data class StytchAPIUnreachableError(val message: String, val exception: Throwable? = null) : StytchError

An error class that occurs when Stytch SDK cannot reach the API

Link copied to clipboard
data class StytchBiometricAuthenticationFailed(val reason: String) : StytchSDKError

Thrown when biometric authentication has failed, providing a reason if available

Link copied to clipboard
data class StytchChallengeSigningFailed(val exception: Throwable?) : StytchSDKError

Thrown when a challenge signing (biometrics, passkeys) has failed

Link copied to clipboard
interface StytchDeeplinkError

A type of error that can occur during deeplink handling

Link copied to clipboard

Thrown when we attempted to handle a deeplink, but no token was found

Link copied to clipboard

Thrown when we were passed an unknown deeplink token type

Link copied to clipboard
sealed class StytchError : Exception

A base error class for all errors returned by the Stytch SDK

Link copied to clipboard
data class StytchFailedToCreateCodeChallengeError(val exception: Throwable) : StytchSDKError

Thrown when we couldn't create a code challenge on device

Link copied to clipboard
data class StytchFailedToDecryptDataError(val exception: Throwable?) : StytchSDKError

Thrown when there was an error decrypting data from persistent storage

Link copied to clipboard
data class StytchInternalError(val exception: Throwable? = null, val message: String = "An internal error has occurred. Please contact Stytch if this occurs.") : StytchSDKError

Thrown when all else fails. We should audit our usage of this and see if it makes sense to create classes for these

object StytchInvalidAuthorizationCredentialError : StytchSDKError

Thrown when the Google OneTap client or nonce is missing

Link copied to clipboard
object StytchKeystoreUnavailableError : StytchSDKError

Thrown when the keystore is unavailable, but the developer did not pass allowFallbackToCleartext=true

Thrown when the Google OneTap authorization credential was missing an id_token

Link copied to clipboard
data class StytchMissingPKCEError(val exception: Throwable?) : StytchSDKError

Thrown when we couldn't find a code verifier on device

Link copied to clipboard
data class StytchMissingPublicKeyError(val exception: Throwable?) : StytchSDKError

Thrown when we are unable to retrieve a biometric key

Link copied to clipboard
object StytchNoBiometricsRegistrationError : StytchSDKError

Thrown when there are no biometric registrations present on the device

Link copied to clipboard
object StytchNoCurrentSessionError : StytchSDKError

Thrown when there is no current session persisted on device

Link copied to clipboard
object StytchPasskeysNotSupportedError : StytchSDKError

Thrown when you attempt to perform a passkey flow on a device that does not support passkeys

Link copied to clipboard
sealed class StytchSDKError : StytchError

A base class representing SDK specific errors or exceptions that may occur. This class should not be used directly, rather we should be creating implementations for each of the known/expected errors we return.

Link copied to clipboard
data class StytchSDKNotConfiguredError(val clientName: String) : StytchSDKError

Thrown when you try to use the SDK before it has been configured

Link copied to clipboard
data class StytchSDKUsageError(val message: String) : StytchError

An error that occurs when an SDK method is called with invalid input